package com.open.capacity.tenant.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.open.capacity.tenant.dao.entity.Properties;
import org.apache.ibatis.annotations.*;
import org.springframework.security.core.parameters.P;

/**
 * properties路由表dao层
 */
@Mapper
public interface PropertiesMapper extends BaseMapper<Properties> {

    //插入一条数据
    @Insert("insert into properties(`id`,`key`,`value`,`application`,`label`,`profile`) values(#{id},#{key},#{value},#{application},#{label},#{profile})")
    int insertProperty(Properties properties);


    //删除某租户路由信息（逻辑删除）
    @Update("update properties set `application`=#{application} where `key`=#{key}")
    int deletePropertyByKey(@Param(value = "key")String key,@Param(value = "application")String application);
}
